aboutsummaryrefslogtreecommitdiff
path: root/pages/en/anime/[...id].js
diff options
context:
space:
mode:
authorFactiven <[email protected]>2023-10-22 19:43:17 +0700
committerGitHub <[email protected]>2023-10-22 19:43:17 +0700
commitf801f8f422954b884a6541321dba0669ee9d6173 (patch)
treee0d5e106b99e9b4e0a4c4bf7bb0464617db85b8d /pages/en/anime/[...id].js
parentBump @babel/traverse from 7.22.8 to 7.23.2 (#90) (diff)
downloadmoopa-4.2.0.tar.xz
moopa-4.2.0.zip
Update v4.2.0 (#93)v4.2.0
Diffstat (limited to 'pages/en/anime/[...id].js')
-rw-r--r--pages/en/anime/[...id].js11
1 files changed, 9 insertions, 2 deletions
diff --git a/pages/en/anime/[...id].js b/pages/en/anime/[...id].js
index 910bbc6..e2c0039 100644
--- a/pages/en/anime/[...id].js
+++ b/pages/en/anime/[...id].js
@@ -72,6 +72,8 @@ export default function Info({ info, color }) {
}
}
fetchData();
+
+ // eslint-disable-next-line react-hooks/exhaustive-deps
}, [id, info, session?.user?.name]);
function handleOpen() {
@@ -143,7 +145,7 @@ export default function Info({ info, color }) {
stats={statuses?.value}
prg={progress}
max={info?.episodes}
- image={info}
+ info={info}
close={handleClose}
/>
)}
@@ -208,7 +210,12 @@ export default function Info({ info, color }) {
export async function getServerSideProps(ctx) {
const { id } = ctx.query;
- const API_URI = process.env.API_URI;
+
+ let API_URI;
+ API_URI = process.env.API_URI;
+ if (API_URI.endsWith("/")) {
+ API_URI = API_URI.slice(0, -1);
+ }
let cache;